From b526733e2f981ab5e4cd321b92e88e72588d57fd Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 4 Feb 2009 11:58:25 +0000 Subject: [PATCH] xm: Improve xm error if booted native Signed-off-by: Jim Fehlig --- tools/python/xen/xm/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index fb98402f26..9c19362715 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -59,7 +59,11 @@ from xen.util.acmpolicy import ACM_LABEL_UNLABELED_DISPLAY import XenAPI import xen.lowlevel.xc -xc = xen.lowlevel.xc.xc() +try: + xc = xen.lowlevel.xc.xc() +except Exception, ex: + print >>sys.stderr, ("Is xen kernel running?") + sys.exit(1) import inspect from xen.xend import XendOptions -- 2.30.2